﻿using System.Windows;
using DaphneProfiBase;
using GalaSoft.MvvmLight.Messaging;

namespace DaphneForms
{
    /// <summary>
    /// Description for NewGameForm.
    /// </summary>
    public partial class NewGameForm : Window
    {
        /// <summary>
        /// Initializes a new instance of the NewGameForm class.
        /// </summary>
        public NewGameForm()
        {
            InitializeComponent();

            // register message for closing the form
            Messenger.Default.Register<NotificationMessage>(this, (nm) =>
                {
                    if (nm.Notification == Notify.CloseForm && nm.Sender == this.DataContext)
                    {
                        Close();
                    }                    
                });
        }
    }
}